﻿
/***************************************************************************

Copyright (c) BizRulX. All rights reserved.

***************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RuleXSoft.BizRuleCreator
{
    [AttributeUsage(AttributeTargets.Property)]
    public class DirectionAttribute : ValidationAttribute
    {
        private bool _output = false;

        public bool Output
        {
            get { return _output; }
            set { _output = value; }
        }
        
        public DirectionAttribute(string message)
        {
            Message = message;
        }

        public DirectionAttribute()
        {
            
        }

        public DirectionAttribute(bool message)
        {
            _output = message;
        }

        public override bool IsOutput(object item)
        {
            return Convert.ToBoolean(item);
                
        }
    }

}
